The retailer reported much better-than expected results on Wednesday but warned of challenges ahead.