Add support for local ignore history. Some DB cleanup.