Sorted the functions somewhat to prevent future mess of random functions everywhere
started working on structure spawning