Revert "first try on the refactor"

This reverts commit 0ae8ea8b11181a36510c0c52e64916fc81463bf0.