Minor code cleanup in the Engine