Implemented main activity lifecycle, added pagination example.