Updated clearice and cleaned code