Refactor RestClient + add javadoc