Minor cleanup of Makefile to ensure that CFLAGS and LDLIBS get used.
Change in style of defining structs.
Some cleanup of the run and query procedures.