refactor instance into service/
Merge pull request #30 from fengjingchao/dev

refactor instance into service/

Made consensus on merge.