Adding check-contents, refactoring a bit the __main__ module