Attempt to integrate tests specified by keyphrase into state.R. More difficult than anticipated. Still buggy.