First pull request

A bunch of small changes.