Permission class added, minor fixes