clearing constructor js
fix for issue #1