Several fixes to AOL and tests

Use the `debug()` macro here