It has been a very rough year for Walmart Stores Inc. (NYSE: WMT). The world’s largest retailer saw its revenue drop by $3.52 billion over the course of 2015. In January 2015, Walmart had revenues of $485.65 billion that fell to just $482.13 billion a year later.

What went wrong at Walmart? How did this seemingly unstoppable retail machine suddenly sputter to a halt after years of relentless growth? The once feared company is actually closing more stores than it plans to open in the United States for the first time in recent memory. In January, Walmart announced plans to close 154 stores in the U.S. and open 135 in 2016; it also announced plans to close 145 additional stores in other countries.

How did such a retail giant mess up so badly? CEO Doug McMillion admitted that he expected flat sales growth for the coming year in a discussion with the press. What mistakes did Walmart make, and how can other retailers and investors avoid them?

Ten Big Retail Mistakes that Walmart Made

Okay, a lot went wrong at Walmart, but there are ten big mistakes that the company made. These are not the only cause of its problems, but they certainly contributed. These mistakes are:

Maintaining a Very Weak Brand – Even though Walmart itself is a very strong company with a good management team, it has a very weak brand with a poor reputation. Yes, Walmart means low prices, but it also symbolizes a lousy shopping experience, poor customer service, and disorganized stores to many customers. Many people in the United States see Walmart as cheap, substandard, and boring. A major problem Walmart faces is that competitors with much stronger brands and better reputations, such as Kroger (NYSE: KR), Target (NYSE: TGT), the privately-held Aldi, Costco Wholesale (NASDAQ: COST), and Amazon (NASDAQ: AMZN), can match and sometimes undercut its prices. Some of these retailers, such as Target, Costco, and Amazon, have strong brands with great reputations for customer service and a fun shopping experience.

A Lack of Consistency – Customers like a consistent shopping experience, yet there is no consistency at Walmart. Customer service, layout, and organization vary widely from store to store. Some stores are well-organized and well-stocked, while others are in shambles. Many of the supercenters in smaller markets are completely disorganized. Others seem to be outdated and poorly run. A problem that I’ve noticed is that there is no consistent policy on such store features as automatic checkout. Some stores have it, while others do not.

Neglecting the Core Business – A major problem at Walmart that it has neglected its core business the U.S. supercenters. Many of these have been allowed to deteriorate, while management concentrated on online retail, dollar stores, neighborhood markets, and other experiments. In particular, many of these stores have poor layout, outdated designs, and lousy stocking. A major focus on the supercenters is needed to update them to counter more focused retailers like Kroger and Costco.

Lack of Focus – Walmart seems to have no real focus. It cannot make up its mind whether it is a discounter, an operator of supercenters, or an online retailer. Instead, it seems to have a dozen initiatives going on at once and no focus upon any of them. Part of the reason the core business has been neglected is the lack of focus.

Mindless Foreign Expansion – Like a number of retailers, Walmart has fallen prey to the plague of mindless foreign expansion. It has succeeded in some markets, but failed miserably in others; for example, in Brazil, the retailer has closed 60 stores. Walmart’s profit margin overseas is 4.5%, while its profit margin in the U.S. is 7.4% despite spending $22 billion, Reuters reported. A big problem was entry into markets it did not really understand, such as Brazil. There have been local problems overseas, including a nasty bribery scandal in Mexico and poor logistics in Brazil. A smart move for Walmart might be to pull back to its core markets in the U.S., Mexico, and Canada and forget the global empire.

Getting Caught Up in Fads – Another weakness at Walmart has been its tendency to jump on the latest retail fad. The most blatant example of this includes the failed U.S. dollar store experiment Walmart Express, which made no sense. Other fads the retailer has gotten caught up in recent years include organic produce, cash and carry stores in Brazil, online retail, delivery, and payment applications. This distracts from the core business, wastes resources, and makes for a complex unwieldy retailer that is hard to manage.

Overexpansion and Empire Building – Has Walmart grown to a size that might be too large to manage? Walmart currently operates 158 distribution centers and 4,177 stores in the United States alone, in addition to 650 Sam’s Clubs, international operations, and a growing online retail business. How is it possible to develop a coherent strategy for such an organization? Perhaps the company is simply too large to manage. Is the sheer size and complexity the real cause of the lack of focus and consistency plaguing this company? Maybe Walmart has become the British Empire of retail – it is now too large to effectively manage.

Taking the Customers for Granted – Of all the sins of retail, none is more unforgiveable or destructive than taking the customers for granted. For too many years, Walmart operated with the arrogant attitude that as long as we have low prices and a large selection, the customers will come. The company treated customers like cattle, herding them around and subjecting them to long lines, poor service, and a dismal shopping experience. Then it was shocked when the customers did not come back. A major problem Walmart now faces is that there is a large percentage of the population that will not set foot inside its stores no matter how good its prices are. Nothing undermines a retail brand more than a lousy reputation, and Walmart’s reputation is dismal.

Poor Employee Relations – For too many years, the only people Walmart treated worse than the customers were the employees. Low, lousy working conditions and lack of training were the norm. In some markets, Walmart was running what amounted to a retail school; workers started there, learned the ropes, then migrated onto higher paying work at Kroger or Costco. Labor unrest and tension with unions and community members have also damaged the brand badly. The recent decision to raise wages to $13 an hour is a step in the right direction, but it might be too little, too late.

Failing to be Competitive – Strangely enough, Walmart, which once had a reputation as an aggressive and remorseless competitor, seems to have lost its competitive edges. In some markets, both Kroger and Aldi have managed to undercut its prices for groceries. Amazon now regularly undercuts many of Walmart.com’s prices. Kroger has also pushed ahead in groceries, adding amenities such as in-store cafes and higher quality items. Target has done a better job of marketing to younger urban consumers. Dollar stores and Aldi seem to be better positioned to sell to America’s growing legion of lower income people. Part of this lack of competition could simply come from lack of focus.

Okay, those are the problems at Walmart. Now investors will ask, “Can the company turn around?” My answer would be yes, but it will take time and a lot of sacrifice. Expect to see this company continue to lose money for two or three more years before it turns around.

Disclosure: The writer responsible for this blog owns shares of Kroger.