remove dead code and cleanup some defaults