Factor app out of lib.views

Lib should not know about app