Made optimizations to the diff bounds calculation
Committing before merging
Resolved conflicts