Make G11 not horribly broken

G11 was completely non-functional. This makes it work the way its description describes. Minimal testing has been done, and the code changed does not interact with anything else, so the chance of breaking anything else should be zero.