Bug Fix: SD card not found error on some devices. Re-organization of script and removal of bloat code.