Small changes and code cleanup.