Misc cleanup, documentation, pretty stack printing

the pretty stack printing is probably the nicest thing here.