Code seperation

- Extracted actual task from core
- Added environment variable to specifiy task to start the server for