Made minor changes to Activity class.