Cleaned up bad references