Fixes #69

In addition to fixing the problem, refactored to move some boilerplate into the MyFragment class