Consolidated allPrgmTable

Changed prgmTable -> allprgmTable

collimated all the independent program table functions to one for loop