Add basic tests for schedule loop
Pull timeoutservice to own class