Added bunch of access control

Rectified columns for a few tables (swtiching and replacing columns)

Included Celso's patch