cleaned up code and simplified createCollection method.
changed version to 1.0.x