minor fixes / clean-up

fixed a race condition in ichip, the rest is just clean-up