extracted repositories to a separate module. removed any dependency on rep.layer from rest.layer.