Started work on implementing support for resources, required some changes in API.