added documentation for championship function, perl tidy