Missing code from old main activity.