Bind our event handlers when we use them, rather then advance
Remove unneeded scoping
Change from the giant else-if chain to a switch/case block