parse fields; add timediff func; other minor fixes