Formatting and corrections

Added a check for empty search string
Added a reset to the list each time search/sort parameters changed
Formatted some code just for the kick of it