Updated code to run on Mokoi 1.0