Changes, fixes, and addition of getState

BAM!