clean up highlightable code and fix condition for firefox