Rearrange component loader code a bit; I think it's a bit cleaner this way.