Added logic to Save button. Clearing code