Switch the shebang line to use /usr/bin/env
Move imports to the top of the file
When decoding a string, replace any length of whitespace with ' '