MoModify spapp.js by reformat code