Removed warnings and unecessary catch