Javascript now works for creation and clears text boxes on completion.