bug fixes and minor feature additions - closes #24, closes #39, closes #45, closes #46