Fixed whitespace stripping

In the last commit I changed how tag_key was being grabbed.
This broke the way that I was stripping the whitespace.
(whitespace from the front was staying)