Refactor with reset module

Signed-off-by: Jia-He Jou <joujiahe@gmail.com>