Added layout to Maps tab and made it work with new UI, also code refactor at number of places