Use correct interface functions.
Removed testing loop.