Miscillaneous code changes