Changed all unsigned long values to simply
  unsigned to work with our 4 byte encoding.