JSLint conversion
fix dimming bug
tidy
combine methods into prototype object