Fixed some bug and added test file.
Added Readme