Add more testing code and optimize code
Merge pull request #153 from Frederick-S/master

Add more testing code and optimize code