removing more old code an bug fixes