Preferences

This is more or less functional now. Only those two database functions must be added. I know the code might look a bit messy and it probably could be implemented a bit more efficiently but I guess it's reasonable for this project.

And while developers.android.com says it is possible to store integers to preferences I found it bit challenging. It is not as straightforward as it could be. Other stupid issue is that which-statements doesn't function with Strings in java-version Android uses.. that's why there are so many if-else-clauses.