Reducing the dependence on SafeArray. It only has few necessary applications. Fixes #26.