Added setfroms and moved setting related utilities around.