Took out unused var warning, added ifdefs