Changed getline to fgets; changeds codes to explicit uint32_t instead of unsigned long