Changed everything to operate on an array of bytes versus an array of shorts.