Touch up some errors in michael's code