Removing unnecessary extensions