These utility methods should definitely get moved into a separate file, don't you think?