Refactoring scheduler to PT

This is work in progress. All task creation is gone from runtime and is expected to be initialised in PT.