Modified function performing saving to remove tabs that does not have user input

Post commit code review : Cyrus Venn Casada