Make TanH cleaner, more efficient, and possible to use in-place