Further testing, docs and reorganization 

constants moved in _constants,

a lot of comments and reorganization