Declare variables

Some variables that are not being declared, or they are meant to be local but run in the global namespace.