Refactor/rest manager