fixed doc
reformat
revamp RPSL lib, step one
(also added better error reporting)