Fixed a number of issues and updated API
2.0.0