changed deprecated functions. Also fixed the field remove route method.