database.py script
minor fixes (path.sh) etc.

TODO how to reuse scripts which are (partialy) independent among applications