streamlining and bug fixes
javacsript fixes