Adapted REST calls of the client to use $q. Integrated the use of the server-based configuration (especially for default branch and build)