moar code cleanup