more cleanup stuff, and adding a user command