Cleanup
- improving the api for scheduled tasks