Updated code to work with Tori 2.1-DEV