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.
Commit before branch switch.
Switched to Gaussian blur filtering.