Refactoring class factories, rename name of factories and add some spec