Added --all toggle.
Removed unnecessary copying
Tweaked variable names
Fixed a (dumb) logic error