Revert the commit of profiling.

  That was comitted in error.
  Updated flag-handling.

  The current code is cleaner, simpler, and more likely to be
 fast.  Speed is important because "limit('new');" mostly boils
 down to:
    has_flag( "N" ) || (!has_flag("S"));

  This updates #140.