Added methods to add permissions, resources, roles.

Changed tables.