Revised version of paper.h

included calls to libraries
namespace definitions
general fixing of Matts shenanigans