Addresses some of #41 and fixes #44