Refactoring of a Chess program developed in Java