refactor the code and the directory structure. The test are improved. Need to use a proper testing framework
improve tests