Semantic unit: fix bug, where selection boundaries where not correctly checked, fix #15, fix #17
Semantic unit: handle linebreaks correctly, fix #16