Adding and registering layer resource for use in tasks, adding envoy and removing unneeded code