Updated to use fragments.  
a couple of comments added.