Debugging and API improvement