Mutability

Remove mutability where possible.