adding a reusable function for formatting 404s
comments and some shuffling around