More refactoring towards pure functional code. :)