add first steps to support user-level tasks
extending example task, fix bug in handling of the TSS
Simplify code, add additional comments