Refactored classss.