Added refactored codes (wip)
Refactor adaptable module.