Removed the partmode variable