(1) Corrected parsing of frames with empty data
(2) Added error checking in disp()
(3) Changed all tabs to 3 spaces