how was the spanish colonial empire organised beforethe independence of mexico