v1.0 bugfix 2

some cleaning in JS