Made most variables and functions private.