Rewriting Stargates

All this stuff is really broked.