Fixed indentation in script and basically fixed the script with ONE BUG remaining.
random commit for the hell of it