Fixed folder cleanup and added rules update