added documentation and moved the features out of a fragment to be more flexible