Update: cleaned up code in listchanges and handled a corner case in _mai...

+ Cleaned up the if-else block in _main_.py
+ Replaced "ugly hack" with proper code :p