Improved constructor setup.