Refactoring

Refactoring and add "setSerializer"