Some refactoring
Added map resize and tile resize views
Some error handling