fixes
properly quoted vars in bash scripts
cleaned up script; added limit option