Add some docs and perlcritic fixes.