Solved screen rotation bug.
Created most of the activity life cycle methods.