JSLint compilance, class refactor, docs added