renamed Context resource to Environment and changed api accordingly. Also fixed bug with environment collection endpoint