How were the Nuremberg trials justified legally, and why weren't any allied leaders put on trial?

by Bartleif
  1. How were the Nuremberg trials justified when there's a legal principle that laws can't apply retroactively? As far as I know the Nazis didn't break any laws at the time. After all they made their own laws.
  2. Why weren't allied leaders tried for war crimes well? E.g. Truman for nuking Hiroshima and Nagasaki, Churchill for bombing Dresden and Soviets for raping, looting and killing in Berlin and eastern Germany.
Georgy_K_Zhukov