Add tests - fixes #1