Fixed up some errors to get it running