quick tweak, remove dead code, return value

The api function now returns something useful in addition to doing a little bit
of work.
It used to do a little bit of work, now it returns the result.