clean up some stuff; minor syntax polish