Add comments and clean .js file