Fixes #1 - partial reference cleanup