Edited the python for readability and cleanliness. 

These are mainly readability tweaks and some error handling here and there, all the logic was solid :) Will transition these changes to the other two repos tomorrow or Wednesday :)