Updated to work with new Class Based API