syntax & type fixes

debugged some basic syntax and type conversion errors.

still need to figure out why the driver won't work.