Enhancement: Added static methods to get instances based on conditions
Enhancement: Added method to set the current entry as the main one of a
category
Change: Sort definitions are now applying themselves to a given query
Change: Removed unneeded Python contexts for database instances