Reorganise db/view compaction section, closes #321 (#638)