remove unused variables etc compiling with -Wall