Simplify builder structure and add new tests.