Cleaned up the code
Added real preferences
Updated build dependencies
Fixed manifest
Make use of savedInstanceState