* This is more of a template than something standalone
I've extracted this from another project, but I think it's useful
enough for making it public.