Remove unused line of old code.
Replace hard-coded paths with system globals where possible.
More replace PHP @unlink() with system unlink_if_exists().
Use PHP date() function instead of exec() call.