Added return if var doesn't exist

Added return (boolean) if the var exists (setVar, getVar, ... ).

Added bugfixes.