break out html serialization into its own module