Refactor

Resolve Issue #1032