MPL: OOPified wff handling functions into Wff object

Also renamed some things.
Integrated MPL changes into app code
Added footer