Fix more bugs, update click handling, etc.

Fixed all remaining compile-time errors, updated the graphics window's
select click handler, and made a few other modifications.