added tostring to QueryProgram. Added query analyzer