Fixed up some syntax and added some constants