Changed store factories to be prototype based.