Some refactoring with Immutable