Fixed a number of sanitization issues and strict warnings