Helpers for non-Rails usage.