Removed horribly named arrays xb1,xb2,yb1,yb2 in favor of stucture with enumeration.