Refactor to use current renderer code from babdev/renderer