massive refactor of task/package system