Refactor, preparing for compatibility test.