complex refactoring to support customized highlighting and background images

Signed-off-by: ekkes-corner <ekke@ekkes-corner.org>