Avoid comparing None with integer for Python 3
Rename src/ to grail/ so the package can be named “grail”
Incorporate top-level modules into package to be named “grail”

* Most scripts now probably best run using the "python -m" option