Added sort keys option -- defaults to true