Cleaned up Engine Code.