Missing variables and functions added