Change sort representation to class

- changed sort representation from String to class
- modified API's accordingly
- replaced string literals with constants
- cleaned up a lot of mess 
Be a bit more specific about what TODO. At least put the name of the person that should look over it.
I think it's an unwritten convention that we have right now. Maybe we should add it to the list of rules.
@dwightguth do you agree that all TODOs should have the name of the person that should take care of it?