Move ASSERT macros out of the details