Adding exception handling and importing only things I'll need
Using dictionary instead of ifs
Beautifying and optimizing