Guard Permissions & double-door open + auto-close
added method to Permissions to prepend a permission
fixed sql query on cleanup & optmize
removing old TODOs