Fixed segmentation fault by changing subt variable to subtaskTable. Also changed some other variable names so that they are more readable.