Implement preserving mainlines on history lanes
Implement configuring of mainlines
Remove currently unused preferences
Compile tests without warnings
Protect against null repository