Fixes #288 - adds smarter expression parsing.