1) Some code cleanup.
2) Replace int16 with kkint16, uint16 with kkuint16, etc for 8bit and 64 bit.  This helps prevent conflict with other packages that may also define these types.