Cleaned up code, compile changes.