I know it was an attempt by Hitler to get control of the SA (Brownshirts) who were independent of him at that point. Were there any other justifications?
The SA had the numbers and the poor discipline to become a potential problem for Hitler. When the Nazis were in opposition to the state, the SA served a purpose and represented a useful means of undermining the authority of the Weimar government by formenting violence appearing to represent a grassroots anger. By baiting communists and socialists, they also encouraged fear of those groups who often responded in kind. They also represented to an extent an alternative to trade unions to represent poor and unemployed Germans.
But having taken power and secured the passage of the Enabling Act, the SA was a threat. He moved quickly destroy union power and cut down communists and socialists. He, in steps, secured control of the official coercive apparatus of the state. And having taken power, he needed the opposite of that the SA was there for: to project an image of stability and order.
The SS were far more useful to him, able to take on enforcement roles, especially extra-judicial ones, and to do so quietly and in an orderly fashion.
The SA still served a purpose as there were socialists within the party who expected results from the Nazi's opposition rhetoric of providing for the poor, especially those in rural areas. The SA was quite important in maintaining this image of a party in touch with the land.
I'm sure others with broader knowledge can give better answers.
The Night of the Long Knives served several reasons. First the SA (Brownshirts) were growing rapidly in power and Hitler saw them as a potential threat to his newly appointed position as Chancellor. It was led by Ernst Rohm, who was becoming increasingly controversial throughout the era (despite being one of Hitler's loyal supporters throughout most of the period as well).
The SA in general had also become problematic because they numbered now nearly 3 million, which was far larger than Germany's armed forces of about 100 thousand (this meant that they could well stage a coup). They gave off an appearance of an unruly paramilitary mob, which ran counter to the appearance of order Hitler now wanted as Chancellor. (it also didnt help that many SA were also ex Freikorps and were involved in numerous incidences of unruly street violence against the Spartacists in the 1920s)
Ernst Rohm now also spoke repeatedly of a second revolution, which Hitler now viewed with utter suspicion and seemed to give off the vibe that the SA was a better reflection of Nazism than the armed forces were.
The SA had also attracted communists, socialists and other left wing elements which were strongly opposed by the German right wing nationalists Hitler was now courting. (the olden days of Nazism saw a unity of strong left and right wing elements) So to appease the nationalists, Hitler had the SA purged. It was also a convenient way to depose others whom Hitler viewed as a potential threat to his new order.
(For example another victim of the Night of the Long Knives was Gregor Strasser who was increasingly publishing his own interpretation and brand of Nazism that didnt align with Hitler's and also took anti-capitalist rhetoric to the more extreme, which would be a liability to the private industrialists Hitler was counting on for support)
The SS however increasingly grew closer to Hitler. Himmler and the others appeared loyal to the core (and were). not to mention they had more of the "bodyguard" roles so Hitler was more likely to trust them.
The official propaganda was that there was an attempted coup by Rohm and these other elements to depose Hitler, and it seems that the German people fell hook, line and sinker for this ruse. Even Hindenburg was pleased with the Night of the Long Knives.
Now the left wing elements were deposed and Hitler was firmly in line with the Prussian military aristocracy and other conservative ultranationalists, who were a significant power base in Germany. the Nazi Party had now a firm grip over almost every level of German society.