Probably best to use a small, well-tested framework rather than roll our own, if something suitable exists.