Prefixing ist good, making them static is even better and always a good practice. Please, never ever declare and define a variable named ''state'' with global scope :-\