Class refactor