Feature #5157 - Refactoring some codes into REST Web services