Fixed bug in short type, added tests for short and unsigned short.

Apologies for not doing this as two separate branches. I had some issues after the last update.