Made basic refactoring of ChessEngine(more necessary)