axes code cleanup