Added permission long id
And initiated the implicits for tables