Database changes. Fixed some variables and parameters.