Fixed hats, added command line stuff, added scripts to the repo.