Some code style improvements.
Make converters generic.
Add converter for shorts.