Add STATE to variables.to.get and clean up indentation
Make tmp.target.scores state specific when STATE present