Definitions layer now "sectionally" aware

Ultimately, this should make definitions work for both non-JS users and IE users.

Takes lead of the internal citations layer. Also some PEP 8 fixes.