Cleaned up code, moved map type to settings page.