Enforce immutable collections in API

This commit is orthogonal to the types commit and proposes to enforce using immutable collections in the return types of the API