Some cleanups to location interface.

Avoid three redundant fields in struct.
Use unsigned instead of int for argument for API consistency.