Code cleanup from 30k ft