Separate code

Fixes #8