Necessary changes in order to work with the new Rest interface
Refactoring and changes due to the massive changes in the rest api