Add rest apis around TU and Cursor and so on

Sorry for very large pull request. This is all I have implemented for now and complete features around Cursor interface. Tests cover all interface methods.