There is an awful lot of similarity in these 2 methods? Can some be abstracted out to avoid this much duplication?