Implemented and tested the initial ast builder.