Renaming and some refactoring