Cleanup: Remove typedef stuff. Use int for almost everything.