Completed initial implementation of method that fixes all overlaps. Need to test more though.