This works, so i'm pushing it. It's actually pretty good, functionally. Going to modify structure to deal with states more correctly, though.