Sort by favourites

Resolves issue #43 
Eww magic numbers