Refactor repository usages to use services. Format. Fix minor issues
Reroute access to repositories through services.
Abstract away page size calculation.
Reformat array initialisers to make the code easier to read.
Fix user solutions page during contest to show the correct amount of
solutions per page.