Added helper to format dates. Added sorting for posts