Clean up wotapi functions