Added functions and variables to enable passing of geometry type.