[-] Remove commented code [*] Replace global variable with function argument
merged
mentioned in commit 3654a55e