Changed how the API methods are attached