Implement allowed spawn areas and more refactoring