First version

Version after unit testing.
It has not run hadoop yet.