Changed some variables' visibility to private.