Fixes #8 and is starting place for #3.