Greatly improved spawning system.

The engine is still extremely basic but it's a proof of concept.
I'll add descriptive code comments soon.