Cleaned code and refactored where appropriate. 
Added the perl-CPAN package to be installed.
Split params out into a params class.