Third Commit. Added activity lifecycle logging functionality and fixed the screen rotation bug.