Place cheatsheet in the body when $rootElement is document

Fixes #8

I don't have a clue on how to test this; if you have, please tell me.
Also, I hope these modifications are consistent with your code style.