Fixed the files to fit the current API changes.