Name refactoring, formatting and minor changes