Add more tests, fix builder class