merges #82, closes #85, closes #81, closes #80, closes #66