Cleaning up some reference issues.