Refactor shared logic when creating new quiz vs saving an existing one

Also, translate "__t" property to "type" when loading a quiz