Remove duplicated lines of code.