fixed js errors
streamlining files