Added all the code.
Merge pull request #1 from monster860/master

Added all the code.