Not sure how important it is, but wondering if it'd be better to use a class-based view with `get` and `post` instead of a single, large function.