More format infrastructure

Probably not perfect either.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>