Various fixes and improvements, including notable bugs in ecotag and build_ref_db that made ecotag less specific than it should have been.