clean up a bunch of stuff and more flex changes

Realize that I probably only need to resize canvas once on page load and
not any other time. Go with this as a compromise for now.