closes #21, closes #22, fixes #23, fixes #24, fixes #25, closes #26