Refactored all classes