merge-issue-6-improvements

Thanks to diorcety for the code changes. Added test-case for extended
marker interface