closes #25, closes #20, closes #18, closes #17 and starts work on #11