Add Spawner module
Spawner module implementation
Use Spawner module instead of main file function