Added CLI interface and did a little clean up.

Added CLI ability because I wanted to run this from cron w/o using a web server.  I also cleaned up some of the methods that where taking parameters they already had access to through the classes _config variable.