wip: use mdl app state, create new window/app_cache/app_state struct. many things are broken right now.