Remove pass-by-reference
Fixes #2