General refactoring and adding some new files