Some minor code cleanup