Refactoring __construct