Added __main__
Removed '*' imports
Fixed out of index bug
PEP 8 fixes