var updates
change var names
added sanity checks and removed unneeded stubs