implement get_slug_field(); other fixes
separate permissions module