Deleted unneccesary things
Added error handling!