More restrucuturing.
Merge pull request #5 from kalodsun/master

More restrucuturing.