got save local working, made changes suggested by jslint