Updated the code to work with newest version of Cure