Turned into real-time fetching data from database, created constants for sorting threads and search options, removed unneccessary ternary operators