Adding new tasks and refactoring code