Cleaning and syntax error fix