Refactoring of the old code dividing logical block into files. Add the documents generated with sphinx