cleaning up the command things and adding a permission tracking