What was the name of the agreement which created a two part (2 house) legislature?