Implement ReferenceRemover

Fixes #12