First bits of OpTree implementation

First version of OpTree is implemented. Any comments are welcome!