Refactored into packages, removed redundant classes