abstracted out a sortByName function, removed unused scripts