Reorganize code

Code reorganized
Fill test on 1.3 and 1.1.8