Refactoring and corrections
Add new files