Moved to class properties

Signed-off-by: emanuele <emanuele45@gmail.com>
Missing global

Signed-off-by: emanuele <emanuele45@gmail.com>
 Variables out of scope

Signed-off-by: emanuele <emanuele45@gmail.com>
Again out of scope

Signed-off-by: emanuele <emanuele45@gmail.com>
Undefined variable

Signed-off-by: emanuele <emanuele45@gmail.com>