cleaned up, commented
added support for multiple highlights in one field; improved calculation of positions