Added tutorial fragment. Fixed a couple backwardscompability issues.