Refactor config a bit, improve test system, add more util functions, clarify LIKELY macro, improve some function names and descriptions.