Commented some stuff, cleaning it up a bit
....
Acutally loads the correct resources to delete cache from
Cleaned up a bit more
Fixed an stupid error and added better way to avoid errors
Fixed error when trying to update a rule
Made a way to determ if event is on create or update
Fixed bug where unchecked checkbox would be stored as checked
Fixed issue where resource was stored with resource-name as id
Fixed issue where children-field was not correct when updating a rule
Now checking if there's a rule with a resource and children checked + lots of fixes
Some cleanup, not entierly sure about the quality
Added simple explanation