Added Getopt::Long for argument handling.

Added Pod::Usage for docs.
Using Time::localtime for named time info.

Refactored most of the code.