Optimizations & Refactoring

Buildings can now have their own class. Also, buildings have click
events.
The size of save files was reduced by 50%.