Cleaned up legacy code.