Fix some naming issues

Just a proposal, Python's keyword should not be used as normal variables in
order to avoid future potential problems.

Also in the test suite, the function name is duplicated with existing one.