Cleaning up drawing_function.js

there's a lot of unnecessary code in here that's unrelated to the annotation code itself---