Added compareObject function to do a deep comparation between two different objects.