Fixed API, with suggestions from @nitnelave

Incorporated your advice and suggestions, I've yet to test it.