Corrected specification typo. Implemented some intermediary statement processing functions.