some small code cleanup