added condition parse when parsing CHECK keyword
extensive refactoring for naming consistency
set up the SRA machinery (not tested yet)