Optimized the code (added missing clear for a list and reduced cpu usage from >40% to <10%)
UI tweak