Added warnings, comments, removed dead code.
Basic error checking and options for archive-local command