Added Readme and fixed some bugs.