Fixes #24
closes #21 #22 #25