Add toByte/sliceToByte and fix sign extension in toShort/sliceToShort