refactoring: use some abbreviation and make some member funcs out

Instead of full word such as homework, I changed it abbreviation
such as hw to improve readability. Also make some member functions
out of class because they didn't need to coupled with class.