Added a switch to unpack archives. Removed some old code.