Add an option to automatically delete blocked items, code cleanup