Added in more formatting options and writing out types correctly.