Merge pull request #1 from caseyscarborough/master

Refactor cpl.php.
Merge pull request #2 from caseyscarborough/master

Refactor upload.php.