Added global/local flags

And actually added support for sub-command aliases (I am teh dumb)