3dr services client lib update

Code refactoring based on the new api from the 3dr services client library update.
Multiple bug fixes.