HTML functionality is done. Some error checking

Checked for error inputs and handling it gracefully. HTML stuff should
be done.