add cortex:stop function; add route cleanup