Minor code cleanup here and there