Hooked up some stuff

NOTE: document.getElementById().width/height does not return a number.
Need to fix in the code.