Fix formatting.
Ensure other fields related to bibId are cleared if BibId is cleared plus some minor refactoring.

Note that title won't be overriden because on the server side, it is ignored if it is attempted to be set to blank.