[WIP] Cleanup permalink generation