cleanup and remove deprecated stuff