Various fixes. Closes #47. Released 0.0.7