Refactored constructor + removed code duplication