Additional changes for expression support

Recreation of #31 targeted to the master branch, after merging #29.