Refactored out method for running event loop until interupted