Added support for custom tests. Fixes #37