Improve support for boolean statements (Fixes #13 and Fixes #14)