major refactoring. now featuring more object oriented code, data-attributes, comments and jsdocs