cleanup unnecessary imports.
let the output image path be a parameter.