Refactorization of simple object creation