Cleaning up downsampling for integer factors