Refactor: Document input parameters
Refactor: Localize function