cleaning code, add JSDoc header

cleaning code following jslint prescriptions
adding JSDoc header
refacing of the elements, view and model package