Combine similar adjacent blocks