Optimizing Plans through Analysis of Action Dependencies and Independencies