Refactoring of the code. A lot cleaner now ;). I also fixed some of the commands not working, like the permit and redone the permissions.