Cleanup and add file parameters.

Did some general code cleanup (spacing, using faster PHP functions) and fixed issue #1 by adding a file and files parameter to allow specification of files.