change mode to compile
remove some unused variable/function warnings, remove some debugging output