Rewrote the UI using Fragments