fixes #8
fixes #9
general cleanup