[#49151933] Tidyup javascript code to manage References modal. Removed duplicate requests being sent for creating a new reference. Separated typeAhead initializer to a different class. Enable save and close button in create.js and new.js