Did a bit of retrofactoring. Fixed some redundancy.
Removed mysql sanitize function
Merge pull request #2 from shefHauwanga/master

More retrofactoring.