More and more mobile fixes and code cleanup