added fragment to testing.
updated and fixed deprecated APIs
added more overrides and comments.