move history archive implementation into it's own source file