Add comments
Refactor task class