Wrote more code for scope constructor.