Add documentation and fix highlight bug