Added parameter guards.

Also, added some more accessor macros.