fixed loads of bugs... everything mostly working, todo: test task replacement.