Refactored the lines highlight and expand/collapse functionality, made it easier to initialize on callback from prettyPrint