Refactor citation formatter