Merged in document stuff from 059dcc936e55d8473a3a683162a7d6e5ce3af3f8. Seems to be where the layout issue was. Used different code to the super call, as that is what seemed to be the problem. Tests passing.