Refactored constructor into two seperate methods.