Refactored constructor to use setters