Refactored some code and class names