Added some variables and code branches.