dunno why the permissions were like that...
few fixups
quick refactor...