Changed Main to accept lists of declarations