Extract test functionality

Fix #101.
makes sense, yes.