declare necessary variables before sourcing sub-modules
Merge pull request #161 from masatonagai/feature/re_fix_159

declare necessary variables before sourcing sub-modules