Made modifications to code to make it work...at least partially.