Generalize object creation; rename creation functions; update macros