Modified the code and made it better

Modified the code and made it compatible with Python 3 and reduced like 100+ lines of unnecessary code. Feel free to comment and merge this pull request. Please generate a modified exe after merging this pull request so that exe is also modified according to the modified ```.py``` file.