Restructuring format class and providing useful factory functions.

Signed-off-by: Ryan Helinski <rlhelinski@gmail.com>