misc code updates