Added metadata to task and wrapped options into it.
Adds task activate and deactivate functions