Could we move this into something like app/lib?