Better generalise building + a crash bug fix

Might need some special cases for some buildings though
Rename spawn to be more general