The best explanation for how Japan was organized politically during the medieval period is: A network of warriors governed Japan at all levels, including the shogun, who was more powerful than the emperor.
During this time, the shogun held military and political power, while the emperor remained a figurehead. The samurai were the warrior class that served the shogun and were integral in maintaining the feudal system.