improved register.depends/factory; improved test coverage