Refactor naming and documentation