 	// MARK: Routing
 	
 	private func URLForCollectionOfResource(resource: Resource) -> String {
-		return "\(self.endPoint)/\(resource.resourceType)"
+		return "\(self.baseURL)/\(resource.resourceType)"
 	}
 	
 	private func URLForResource(resource: Resource) -> String {

        return Singleton.instance
    }

	public var endPoint: String
	private let serializer = Serializer()
	private let HTTPClient: HTTPClientProtocol = AlamofireClient()

	public init() {
		self.endPoint = ""
	}

	public init(endPoint: String) {
		self.endPoint = endPoint
	}
	
	public init(endPoint: String, HTTPClient: HTTPClientProtocol) {
		self.endPoint = endPoint
		self.HTTPClient = HTTPClient
	}
	

		
		assert(resource.resourceID != nil, "Resource does not have an href, nor a resource ID.")
		
		return "\(self.baseURL)/\(resource.resourceType)/\(resource.resourceID!)"
	}
	
	private func URLForQuery(query: Query) -> String {
		return query.URLRelativeToURL(self.baseURL)
	}


