Implemented functionality for completing tasks.