HTML whitespaces / indentation / minor errors
Simplified JS code