Declare variables

Undeclared varables generated NOTICE error. The class attributes has been added.

Error disapears when no header/footer actions are performed.