added enabled/logging_enabled, minor clean-up

added enabled/logging_enabled,
minor clean-up
want to rewrite more, but for another day