Made a bunch of small changes.
fixes #39