Fixes for Range transition, and for scalar/array arithmetic

Fix #12