Lots of perl critic clean up.