Multiple fixes to syntax/code