Added some error handling to fix bugs and merged Readme