cleanup and syntax fix