Handling #anchors and unit testing it (fixes #6)