Fixed logical bugs. Updated Readme.