comments replaced with functions to make code cleaner
ensure that thumbnail is scaled in addition to stripping of black bars
simplify code - leave only one stripping function