Updated code to reflect changes in the framework