Code cleanup

Some more code cleanup after refactoring.