rename callback
change indentation of switch-case
use object URLs, since IE9-11 enforce a limit on URL length
fix canvas fill dimensions