js comment fix
off by one bug in part highlighting
refactoring and speedup
more speedup and refactoring