Refactor redimap executable main loop.