Removed code duplication in constructor.