Created interval spawner and refactored stuff a bit