Added fix to castle not spawning

Also split the castle file (was too big and was causing lag in Eclipse).
Added a base class for structures, will make adding more structures
easier. In the process, changed all functions not to be static.