Fixed looping error in blurring function. New results not so great - I'll probably remove the loop altogether, and might switch from median to gaussian.