Thoughtworks interview question

Review Re-factoring.