Fixed formatting,duplicates and invalid syntax