Second round of sanitization. Removed double declarations. Cleaned up mess.