Added sort parameter to routes /, /notebooks, /notes/ and /notebooks/:id/notes
(Refactoring to allow for some cleaner dependency injection)