Renames variable, adds tests and documentation