Environment behaviour

- when creating a new environment by default it will base itself on the main environment
- allow envs to base itself on other environments
- adding converage for flatten json
- fixed a bug where the context shorcuts were defined as an array instead of tree structure