Updated subscription & fixed db factory