*fixed a merge error

*renamed s to inputState

*fixed a few bugs relating to the above