Update simpleTableSorter.js

refactored code