refactored  project structure
 added some tests