Fix mispelled option for ndo
Don't compare string and int.

The option was always on because 0 != '0'
Don't clean up central tables at startup
Clean up
Manage objects table without deleting all items
Manage historical tables
Correctly rewrite instance_id when you have more than 1 scheduler