Object constructor refactored