Resolves #15
Resolves #16
Initial work on #17