Anas branch

Cleaning up the main function, and removing delays