A lot of small changes. Closes #11.