Addresses most code review issues.