Fixed bugs and added readme.