A bit of code cleanup. Fixes #1