hex_proto   :   fixed some display problems with polyGridMode and reorganized (folded) some function calls in js.