Implemented batch file funcitonality.  Did some weird shenanigans to modularize my original functions.  Hope no bugs introduced...