Refactored flags and used those to enable conditional macros to more
easily be written to avoid clobbering many tests.  Also implemented
this for n vs. nx index lookup.
Merge pull request #12 from Ichoran/master

Refactored flags and used those to enable conditional macros to more easily be written