Clean up, refactoring, and Actual/Reference compare functionality