Switched to better API and implementation.