Broke main function into separate init, load_files and clean_up functions
Removed delay and added lazyfoo's event driven exiting