1) Fixed a bug with trailing comments in objects
2) Added a check to check for duplicate keys