Fixed variable range comparison.  Exception string. return from non void function.
fixed variable range type.
Added code for metadata display.
removed unused variable.