added spawn-support and lots of other stuff