Cleaning up the code a little bit.

This initial clean up run was to take out the security risks Fortify found.
Did some more clean up and made sure tags filters were working.
Merge pull request #257 from Jedwondle/master

Fixed the tags filters and cleaned up Fortify stuff.