Clean up some fmts. Fix a bug preventing it from working at all. start on some tests