cached variables, improved undefined checking, changed text