Refactoring of the project to smarthome