tweak issues retrieval
move code to a main() def
add getopt-based command-line options (I hate hard-coded options)