Modularized parts of process function
Merge pull request #13 from fincoda/luyi/dev

Modularized parts of process function