Enhance return api

Addresses issue #15.