Use a config for the directory and URL
Using configs and generating thumbnail cron jobs
A little code cleanup