Test program now uses callbacks; reformatted some things