Added Support for Multi-character prefixes

Prefixes for code types can now be more than one character.
Also fixed some more permission errors.