Removes unused code from edit profile