Add codeclimat
optimize code