Refactored all code, added modules, mixins and classes