Add support for multi-tasks (fixes #13)