moving restclient stuff to its own package.
fixing autowiring issues