closes #12, closes #13, closes #8, closes #5, closes #4, fixes #9