Refactoring the database and database access to allow for searching and sorting
Searching, Sorting, Minor Refactor
Merge of both branches. All features implemented in master.