misc code cleans