Added debug interface.
Updated to new API.