bunch of refactor, tests and immutable setLanguage