syntax fix and more cleaning