Fixed typo.
Optimize Shrs to Shr if possible.
Constify target value API.
Constify mode API.
Cleanup using C99.