Removed unused variables and cleaned up some initialization warnings