Fixed things pointed out by the other guy on Github. It's still missing the part where the user is warned about the data not being valid.