state variable changes
merged from develop and resolved conflicts
Merge pull request #226 from scopatz/svar

state variable changes