Corrected type reference.
renamed function variables to match Python naming conventions.