adding some visual mode stuff, and a few misc fixes