Various bug fixes
Version bump to 1.0