A few more tests for API, minor macro cleanup