Fixing javascript and styling
Adding error feedback in js and html