Inlined some helper functions to improve the debugging experience