Fix bugs, release 1.0

It's now safe to call 'init' more than once.