Names, functions and style refactor