Port to Gtk.Application

Also replace optparse with argparse