Code cleanup. Changed function to the vars module.