uuid format validator and some code reorg
docstrings and small code-reog
flake8 fixes