fixes a bunch of stuff and provides a cli