Added a new Singleton to store preferences and added new code to sort table cells.