Cleanup and new command handler.