added datastore conversion and other features

major code cleanup, getting ready for 1.0 release