Fixed the following:
- Added missing colons
- Check for history in a way that pleases jslint
- Use !== to avoid coercion