Some small code cleanup