Revamp tasks with class-style; update some codes to follow PEP 8 style guide