Refactored class