Proper testing and errors, fixed html bug