Added test cases. Fixed builders.