added migration capability and debugging helpers