Cleaned up pause and play functionality and how it interacts with the android activity lifecycle.