Working p2life implementation

Move into package
Write doctests