add ability to set left / right margins
fix bug calculating all midpoints by width only
add ability to set top / bottom margins
remove debugging style