Refactor class methods