Some extra clen-up and small fixes