Simplify edge box calculations