Partial commit for saving operation :
Various refactorings
Fixes in Javascript files

Post commit code review : Cyrus Venn Casada