Change box_type -> box_flags. Introduce type constant for flags.
Add geometry queries (w/test).
Document, clean up geometry lookup.