Refactor code
fixed issue in rendering map
finished scaling
merging scaling into master