Slight changes to API and fixes. Version 2.0