Address Sensiolabs Insight's warning of code cloning.

Please see some comments below