Changed interger types to be 16-bit for effceincy on embedded system