Refactor of basic functionalities based on the new rules