Reorganize dead reckoning node into separate class and main, for better testability.