Instantiate objects correctly.