Android UI

Also some refactoring in code