General update / refresh of the extension

Some things were malfunctioning (preview for one), so as I started digging around I ended up making a more pervasive update to most of the code. The only file virtually untouched is the extension driver. Please give it a try when you have a minute, hope you find the changes useful / acceptable.