closes #27, closes #34, closes #35, closes #39