reimplement stats view as a fragment
improve livecycle handling