Bug fixes, with change to API interface
Update README