Better sanitizes hash input and now strips out ending and leading white space