Fixes #7, kind of - needs a cleanup