Code refactoring

Fix naming inconsistencies