Refactor new revision logic.
Use jQuery data method instead of attr where possible.