Refactor expression building method

The buildExpression method is now much more modular.