code cleanups in dest logic