Fix routing, pagination, some minor bugs.