Code commented & made generic.
Next on the list is backuppc specific stuff