Added debug, fixed generation lag issue and improve spawning of pirate ships