Some cleanup and a few new commands