Functionally deprecate lib.m

Moved all used values out of lib.m, mostly into ui.m.
Removed the call from main.m to lib.m.

lib.m is for all intents and purposes redundant now.