Refactoring before thorough unit testing.