More logging. Removed legacy code in the icon function.