fix type var name
Start on making this work on the command line
Okay, it kind of actually works on the command line. Right on.
Missing a couple vars
Cleanup