Cleaning up warnings and commenting out unused variables