Rewrite how panels are rendered and refreshed

If rendering a panel is handled by the app and not the panel itself it makes it easier to stop auto-refreshes and such.