[BUGFIX] Fixes halign width calculation + jshint cleanup