Better input validation
Removed some dead code
Split up JS and CSS files