Highlights design

Continuation of #257, just that it is a pull request against development branch. This pull request is addressing #256. Instead of each highlight being one big rectangle area, find smaller reasonable sections and draw border around only them.
The algorithm is hard to read if you only read the code. I would add comments at branches like this, saying which direction you are merging things. So instead of something trying to figure out from code, what the algorithm does at what point, you can just skip over the comments and get a quick overview what goes where.