Windows icon fix + related code cleanup