Simplified Defined Variables  and Fixed Casting of Variables.