Numerous small code changes.