adding perl critic tests
re-factoring core functions
perl critic fix
new test