Modified the Sobel filter, fixed line endings