Cleaning refactor