diff --git a/calculatorpp/res/layout-land/main_calculator.xml b/calculatorpp/res/layout-land/main_calculator.xml
index c445eb00..cadee4c2 100644
--- a/calculatorpp/res/layout-land/main_calculator.xml
+++ b/calculatorpp/res/layout-land/main_calculator.xml
@@ -1,89 +1,64 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/calculatorpp/res/layout/main_calculator.xml b/calculatorpp/res/layout/main_calculator.xml
index 59de37ce..a33f6497 100644
--- a/calculatorpp/res/layout/main_calculator.xml
+++ b/calculatorpp/res/layout/main_calculator.xml
@@ -1,44 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/calculatorpp/res/menu/main_menu.xml b/calculatorpp/res/menu/main_menu.xml
deleted file mode 100644
index d289db7b..00000000
--- a/calculatorpp/res/menu/main_menu.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/calculatorpp/res/values/dimensions.xml b/calculatorpp/res/values/dimensions.xml
new file mode 100644
index 00000000..428505aa
--- /dev/null
+++ b/calculatorpp/res/values/dimensions.xml
@@ -0,0 +1,4 @@
+
+ 0.5dp
+ @dimen/button_margin
+
\ No newline at end of file
diff --git a/calculatorpp/res/values/styles-common.xml b/calculatorpp/res/values/styles-common.xml
index a0561d73..d0690e9d 100644
--- a/calculatorpp/res/values/styles-common.xml
+++ b/calculatorpp/res/values/styles-common.xml
@@ -1,43 +1,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
index 3be1d79c..685ed6a7 100644
--- a/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
+++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java
@@ -1,392 +1,381 @@
-/*
- * Copyright (c) 2009-2011. Created by serso aka se.solovyev.
- * For more information, please, contact se.solovyev@gmail.com
- */
-
-package org.solovyev.android.calculator;
-
-import android.app.*;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.content.pm.ActivityInfo;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.text.Html;
-import android.text.method.LinkMovementMethod;
-import android.util.Log;
-import android.util.TypedValue;
-import android.view.*;
-import android.widget.TextView;
-import net.robotmedia.billing.BillingController;
-import net.robotmedia.billing.IBillingObserver;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.solovyev.android.AndroidUtils;
-import org.solovyev.android.FontSizeAdjuster;
-import org.solovyev.android.calculator.about.CalculatorReleaseNotesActivity;
-import org.solovyev.android.calculator.model.AndroidCalculatorEngine;
-import org.solovyev.android.calculator.view.CalculatorAdditionalTitle;
-import org.solovyev.android.menu.ActivityMenu;
-import org.solovyev.android.menu.LayoutActivityMenu;
-import org.solovyev.android.prefs.Preference;
-import org.solovyev.android.view.ColorButton;
-import org.solovyev.common.equals.EqualsTool;
-import org.solovyev.common.history.HistoryAction;
-import org.solovyev.common.text.StringUtils;
-
-public class CalculatorActivity extends Activity implements FontSizeAdjuster, SharedPreferences.OnSharedPreferenceChangeListener {
-
- @NotNull
- public static final String TAG = "Calculator++";
-
- private static final int HVGA_WIDTH_PIXELS = 320;
-
- @Nullable
- private IBillingObserver billingObserver;
-
- @NotNull
- private CalculatorPreferences.Gui.Theme theme;
-
- @NotNull
- private CalculatorPreferences.Gui.Layout layout;
-
- private boolean useBackAsPrev;
-
- @NotNull
- private ActivityMenu