Enable use of run as script
Remove unused imports
Replace tab with spaces for indent
Comment out assignments to empty list that were failing
Replace tabs with spaces
Replace tabs with spaces
Use numpy to find last nonzero index