small fixes
more fixes
more fixes and js printer refactoring