Trying to fix warnings and remove printfs