We don't fully understand how the Emporer came to power, the family line does seem a part of it but it doesn't seem heredity.
The laws in different cities were similar but not exactly the same.
Most crimes were solved in local courts, more serious crimes were solved in the Tenohtitlan court, the very serious crimes were solved in the Emporers court and solved by professional judges.
The death penalty was a very common punishment, nobles got harsher punishment because they were held at a higher standard.
Slavery was another common punishment but it certain cases they exiled the criminal.