Refactors all format helpers for results and details pages. Fixes #122.