cleaned up merged class to use new refactored methods for marking references