Refactor date/slug extraction slightly