Units can now move around on the map

Changed the structure of several functions in Map.js, because they
didn't really work out the way I wanted them to