Fix bugs to get this functional on butch
Verify that code is now working