Added timeouts and refactored program to separate compiling and running program