cleanup case handling and extra /