So, on the one hand:
-Zelaya himself had engaged in behavior that had been deemed unconstitutional (referendum, firing army chief), and had ignore the supreme court.
-Supreme court says they gave the order to the army to arrest him.
-Congress has sworn in a new president
On the other hand:
-From my quick perusal of the Honduran constitution, the supreme court has no authority to give orders to the army.
-The congress could have impeached him… instead, first they (or the army and/or the court) arrested and expelled him, then sorta kinda impeached him, in a way.
A mess all around.