refactored all necessary classes and resources