syntax, spec and formatting fixes