Cleaned up joshing warnings and unused variables