Removing unneeded references to context