This is a controller, but most of the code below treats it like it's a module (doesn't use any nirvana framework stuff) ...