Refactor FROM and TO

Refactor FROM and TO