first stab at format support. no new tests, but existing ones pass.
stub format test file
major bug fixes... was a bit out of it last commit.
tests for #format
Merge pull request #5 from zever/format

Format