more anyfix macros. misc refactoring.