Greatly simplified API.
Changed API interface.