[feature] extended the layer api to be make it possible for layers to init and connect independently