code cleanup and use of __json__
modified permissioning