Trying adjustments and adding debugging messages
More debugging statements, trying to track where data is lost
Added more debug statements