Added a basic scheduler