added a category model
fixed categories not displaying in transaction table
moved duplicate code to util.js