Fix leo-project/leofs/issues/182
Refactor app's codes