Simplify region handling.
Add apache 2 license