Add tests, make constructor return a pointer