Rearranged the functions within the Pro6pp class.

Added also an extra check in the validate_referer function for sanity.
First tests are finally shipping!
Added more tests for the Pro6pp class.