Refactor rename, visibility of variable names and missing documentation